import React, { Component } from "react";

export default class Detail extends Component {
  render() {
    // 接收state参数,刷新参数不会丢失
    console.log(this.props)
    const { id, title } = this.props.location?.state;
    return (
      <div>
        <ul>
          <li>{id}</li>
          <li>{title}</li>
        </ul>
      </div>
    );
  }
}
